package Practice.classpractice;

import java.util.Scanner;

public class Tested {
    public static void main1(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String string = scanner.nextLine();
        int index = string.lastIndexOf(" ");
        String string1 = string.substring(index+1);
        System.out.println(string1.length());
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String string = scanner.nextLine();
        int start = string.lastIndexOf(" ");
        int len = string.length() - 1;
        System.out.println(len - start);
    }
}
